//
//  ButtonCell.m
//  FKGW
//
//  Created by song ce on 2017/2/27.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "ButtonCell.h"
#import "UIView+Extend.h"
@implementation ButtonCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _bcell = [[ButtonCollectionView alloc]initWithFrame:CGRectMake(0, 0, Main_Screen_Width*.75, 0)];
    _bcell.backgroundColor = [UIColor whiteColor];
    [self.topView  addSubview:_bcell];
}

-(void)setModel:(TagGroupModel *)model{
    _model = model;
    int row =0;
    CGFloat height;
    if(_model.tagArrary.count%3!=0){
        row=1;
    }
    NSInteger   rows = model.tagArrary.count/3+row;
    height =  10+10+rows*22+(rows-1)*12;
    [_bcell setHeight:height];
        _bcell.dataSoure = _model.tagArrary;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
